<template>
	<view>
		<!-- #ifdef APP -->
			<view class="lishow" v-for="(item,index) in tapteacherlist" :key="item.id" @click="godetail(item.id)">
				<view class="right">
					<image class="img" :src="item.urlimg" mode=""></image>
					
				</view>
				
				
				<view class="left">
					<view class="name">
						<view style="margin-left: 20rpx;">
							{{item.name}}
						</view>
						<view style="margin-left: 30rpx;">
							认证
						</view>
					</view>
					<view class="detail">
						<view style="margin-left: 20rpx;">
							{{item.school}}
						</view>
						<view style="margin-left:30rpx;">
							专业:{{item.profession}}
						</view>
					</view>
					<view class="content">
						{{item.profile}}
					</view>
				</view>
			
			</view>
		<!-- #endif -->
		<!-- #ifdef H5 -->
			<view class="lishow" v-for="(item,index) in tapteacherlist" :key="item.id" @click="godetail(item.id)">
				<view class="right">
					<img class="img" v-lazy="item.urlimg" />
				</view>
				
				
				<view class="left">
					<view class="name">
						<view style="margin-left: 20rpx;">
							{{item.name}}
						</view>
						<view style="margin-left: 30rpx;">
							认证
						</view>
					</view>
					<view class="detail">
						<view style="margin-left: 20rpx;">
							{{item.school}}
						</view>
						<view style="margin-left:30rpx;">
							专业:{{item.profession}}
						</view>
					</view>
					<view class="content">
						{{item.profile}}
					</view>
				</view>
			
			</view>
		<!-- #endif -->

	</view>
</template>

<script>
	import $http from '@/common/api/request.js'
	export default {
		data() {
			return {
				tapteacherlist:[]
			}
		},
		methods: {
			gettapteacherlist(subformdata){
				$http.request({
					url:"/gettapteacherlist",
					method:"POST",
					data:{
						
					}
				}).then((res)=>{
					
					this.tapteacherlist=res.map(item=>{
						item.urlimg = `https://zyc618.mynatapp.cc/${item.img}`
						return item
					})
				}).catch(()=>{
					uni.showToast({
						title: "获取listdata_r数据失败",
						icon: "error",
						mask: true,
						duration: 2000
					})
				})
			},
			godetail(index) {
				uni.navigateTo({
					url: `/pages/detail/detail?id=${index}&submitvipform=${JSON.stringify(this.submitvipform)}`
				})
			}
		},
		onLoad(e){
			console.log();
			this.gettapteacherlist()
		}
	}
</script>

<style lang="scss">
.lishow {
		margin: 10rpx 10rpx 20rpx 10rpx;
		display: flex;
		border-bottom: 1rpx solid #b7b7b7;
		padding: 10rpx;
		.right {
			
			height: 200rpx;

			.img {
				width: 200rpx;
				height: 200rpx;
			}
		}

		.left {
			width: 70%;
			font-size: 22rpx;

			.name {
				display: flex;
				margin-top: 10rpx;
			}

			.detail {
				display: flex;
				margin-top: 10rpx;
			}

			.content {
				margin: 20rpx 0 0 20rpx;
				overflow: hidden;
				-webkit-line-clamp: 3;
				text-overflow: ellipsis;
				display: -webkit-box;
				-webkit-box-orient: vertical;
			}
		}

	}
</style>
